import wx
import wxpita

f = wxpita.fromstring("""
SizedFrame sizerType=vertical
    SizedPanel sizerType=form; expand=true
        StaticText label=Name
        TextCtrl value=Feihong Hsu; expand=true

        StaticText label=Status
        Choice
            name=chc
            choices={'OK', 'Insane', 'Mental', 'Crazy'}

        StaticText label=Checkin Date
        DatePickerCtrl name=dpc; style=dp_dropdown

    SizedPanel sizerType=horizontal
        SizedPanel style=border_raised
            CheckBox label=Active
            SpinCtrl
            Button label=Play
            Button label=Stop
            
        CalendarCtrl style=cal_sequential_month_selection

    TextCtrl name=tc; style=te_multiline
        expand=true; proportion=1; size=-1, 230
""")

@f.Init
def _():
    f.chc.SetSelection(2)
    
    f.dpc.SetValue(wx.DateTimeFromDMY(14, 3, 1915))
    
    f.tc.SetFont(wx.Font(15, wx.ROMAN, wx.NORMAL, wx.NORMAL))
        
    for i in range(38600, 38900, 10):
        j = 1 + i % 14
        f.tc.AppendText(''.join(unichr(k) for k in range(i,i+j)) + '\n')

f.Show('FromString Example', size='fit')
